﻿@model IEnumerable<VideoCache.Server.Model.OrderInfo>

@{
    ViewBag.Title = "订单查询";
    Layout = "~/Areas/Member/Views/Shared/_Layout.cshtml";
}

<h2>@ViewBag.Title</h2>

<table width="100%" class="list">
<thead>
    <tr>
        <th>订单号</th>
        <th>产品</th>
        <th>单价</th>
        <th>订购数量</th>
        <th>总价</th>
        <th>订单状态</th>
        <th>订单时间</th>
        <th></th>
    </tr>
</thead>
<tbody>
@if (Model.ToList().Count == 0)
{
    <tr>
        <td colspan="8">对不起，您还没有在本站有过订单。</td>
    </tr>
}
else
{
foreach (var item in Model)
{
    <tr>
        <td>@Html.DisplayFor(modelItem => item.Id)</td>
        <td>@Html.DisplayFor(modelItem => item.ProductId)</td>
        <td>@Html.DisplayFor(modelItem => item.UnitPrice)</td>
        <td>@Html.DisplayFor(modelItem => item.Quantity)</td>
        <td>@Html.DisplayFor(modelItem => item.TotalPrice)</td>
        <td>@Html.DisplayFor(modelItem => item.Status)</td>
        <td>@Html.DisplayFor(modelItem => item.CreateTime)</td>
        <td>
            @Html.ActionLink("查看详情", "Details", new { id = item.Id }) |
        </td>
    </tr>
}
}
</tbody>
</table>